package com.per.mybootall.config;


import org.springframework.stereotype.Component;

import javax.websocket.Endpoint;
import javax.websocket.server.ServerApplicationConfig;
import javax.websocket.server.ServerEndpointConfig;
import java.util.HashSet;
import java.util.Set;


/**
 * @author asus
 */
@Component
public class SocketConfig implements ServerApplicationConfig {
    @Override
    //接口启动
    public Set<ServerEndpointConfig> getEndpointConfigs(Set<Class<? extends Endpoint>> tests) {
        Set<ServerEndpointConfig> result=new HashSet<>();


        return result;
    }

//注解启动
    @Override
    public Set<Class<?>> getAnnotatedEndpointClasses(Set<Class<?>> set) {
        System.out.println("WebSocket  init========>>>>>>>>");
        System.out.println("WebSocket扫描到的class:"+set.size());
        return set;
    }
}
